﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.SessionState;

namespace tjb.WebTest {
    /// <summary>
    /// 测试类库
    /// </summary>
    public class MyHttpMoudle : IHttpModule, IRequiresSessionState {
        #region IHttpModule 成员

        public void Dispose() {

        }

        public void Init(HttpApplication context) {


            context.BeginRequest += new EventHandler(context_BeginRequest);
            context.EndRequest += new EventHandler(context_EndRequest);
        }

        void context_EndRequest(object sender, EventArgs e) {

            HttpApplication context = (HttpApplication)sender;
            
            string[] ms = context.Modules.AllKeys;
            foreach (string m in ms)
                context.Response.Write(m + "<BR>");
        }

        void context_BeginRequest(object sender, EventArgs e) {

        }

        #endregion
    }

}
